{template Public:Admin:header}

<div class="row">
  <div class="col-lg-12">
    <div class="table-toolbar">
      <div class="row">
        <div class="col-lg-12">
          <div class="text-right"> </div>
        </div>
      </div>
      <div class="row">
        <div>
          <form action="{echo U($module.'/'.CONTROLLER_NAME.'/index')}">
          <div class="row">
          <div class="col-lg-12">
             <div class="col-lg-2">
              <input type="text" value="{echo $selectarray['id']}" placeholder="ID" class="form-control" name="id">
            </div>
            <div class="col-lg-2">
              <input type="text" value="{if $selectarray['amount']}{echo $selectarray['amount']/100}{/if}" placeholder="金额" class="form-control" name="amount">
              
            </div>
            <div class="col-lg-2">
              <input type="text" value="{echo $selectarray['subject']}" placeholder="名称" class="form-control" name="subject">
              
            </div>
            
             <div class="col-lg-5">
             <div class="row">
            <div class="col-lg-5"><input name="dateline1" type="text" class="form-control" placeholder="YYYY-MM-DD" size="10" value="{if !empty($sqlkey['dateline1'])}{echo $sqlkey['dateline1']}{/if}" /></div>
            <div class="col-lg-1">~</div>
             
             <div class="col-lg-5"><input name="dateline2" type="text" class="form-control" placeholder="YYYY-MM-DD" size="10" value="{if !empty($sqlkey['dateline2'])}{echo $sqlkey['dateline2']}{/if}" /></div>
            </div>
            </div>
            </div>
            </div>
            
            <div class="row" style="padding-top:10px;padding-bottom:10px;">
            <div class="col-lg-12">  
             <div class="col-lg-2">
              <input type="text" value="{echo $selectarray['payin_uid']}" placeholder="收入用户UID" class="form-control" name="payin_uid">
            </div>
             <div class="col-lg-2">
              <input type="text" value="{echo $selectarray['payin_username']}" placeholder="收入用户名" class="form-control" name="payin_username">
            </div>
             <div class="col-lg-2">
              <input type="text" value="{echo $selectarray['payout_uid']}" placeholder="支出用户UID" class="form-control" name="payout_uid">
            </div>
             <div class="col-lg-2">
              <input type="text" value="{echo $selectarray['payout_username']}" placeholder="支出用户名" class="form-control" name="payout_username">
            </div>          
            <div class="col-lg-2">
              <input class="btn btn-default search-button" name="搜索" type="submit" value="搜索" />
              <input type="hidden" name="search" value="1" />
            </div>
            </div>
            
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>

<form method="post" id="SubmitForm" action="{echo U($module.'/'.CONTROLLER_NAME.'/delete')}">
<div role="grid" id="editabledatatable_wrapper" class="dataTables_wrapper form-inline no-footer">
  
  <table id="editabledatatable" class="table table-striped table-hover table-bordered dataTable no-footer" aria-describedby="editabledatatable_info">
    <thead>
      <tr role="row">
        <th class="sorting_disabled" rowspan="1" colspan="1" style="width:38px"><div class="checkbox">
              <label>
                <input type="checkbox" id="CheckAll" style="display:none">
                <span class="text"></span></label>
            </div></th>
            
          {foreach $orderarr $key=>$value}
          <th onClick="window.location.href='{echo U($module.'/'.CONTROLLER_NAME.'/index/sqlorder/'.$key.'/iforder/'.$iforder.'/p/'.$pagenum)}'" tabindex="0" aria-controls="editabledatatable" rowspan="1" colspan="1"  aria-sort="ascending" aria-label="{echo $value['name']}" {if $key==$sqlorder} {if $iforder==2}  class="sorting_desc"{else} class="sorting_asc"{/if}{else} class="sorting"{/if}> {echo $value['name']} </th>
          {/foreach}
          
          
        <th class="sorting_disabled" rowspan="1" colspan="1"> </th>
      </tr>
    </thead>
    <tbody>
    
    {if $list}    
    {foreach $list $value}
    <tr>
      <td style="width:38px"><div class="checkbox">
            <label>
              <input type="checkbox" name="checkbox[]" value="{echo $value['id']}" style="display:none">
              <span class="text checkbox"></span></label>
          </div></td>
     <td>{echo $value['id']}</td>
     <td>{echo $value['serial']}</td>
     <td>{echo $value['dataid']}</td>
     <td>{echo $value['subject']}{if $value['dataid']} <a href="/task/{echo $value['dataid']}" target="_blank">[查看任务]</a>{/if}</td>
     <td>{echo $value['payin_uid']}</td>
     <td>{echo $value['payin_username']}</td>
     <td><span class="color_f60">￥{echo $value['payin_money']/100}</span></td>
     <td>{echo $value['payout_uid']}</td>
     <td>{echo $value['payout_username']}</td>
     <td><span class="color_f60">￥{echo $value['payout_money']/100}</span></td>
      <td>{if $value['payin_uid']==$uid}<span class="label label-success">收入</span>{else}<span class="label label-info">支出</span>{/if} <span class="color_f60">￥{echo $value['amount']/100}</span></td>
      <td><span class="color_f60">￥{echo $value['fee']/100}</span></td>
      <td>￥{echo $value['refundmoney']/100}</td>
      <td>{echo $value['unionuid']}</td>
      <td>
      {if $value['process']==1}
      <span class="label label-default">等待付款</span>
      {elseif $value['process']==2}
       <span class="label label-info">已付款</span>
      {elseif $value['process']==3} 
       <span class="label label-sky">等待确认</span>
      {elseif $value['process']==4} 
       <span class="label label-danger">退款中</span>
      {elseif $value['process']==5} 
       <span class="label label-success">交易成功</span>
       {elseif $value['process']==6} 
       <span class="label label-default">关闭订单</span>
       {/if}
       </td>
        <td>{echo FormatDate('Y/m/d H:i:s',$value['dateline'])}</td>
        <td>{echo FormatDate('Y/m/d H:i:s',$value['endtime'])}</td>
      
      <td class=" "><a class="btn btn-info btn-xs edit" href="{echo U($module.'/'.CONTROLLER_NAME.'/close/id/'.$value['id'])}"><i class="fa fa-edit"></i> 关闭</a> <a class="btn btn-danger btn-xs delete" href="javascript:void(0)" onclick="ConfirmDelete({echo $value['id']},'{echo U($module.'/'.CONTROLLER_NAME.'/delete/id/'.$value['id'])}')"><i class="fa fa-trash-o"></i> 删除</a></td>
    </tr>
    {/foreach}
    
    {/if}
      </tbody>
    
  </table>
  <div class="row DTTTFooter">
    <div class="col-sm-6">
      <div class="dataTables_info" id="simpledatatable_info" role="alert" aria-live="polite" aria-relevant="all">总共{echo $count}条数据</div>
    </div>
    <div class="col-sm-6">
      <div class="dataTables_paginate paging_bootstrap" id="simpledatatable_paginate">
        <ul class="pagination">
          {if $page}{echo $page}{/if}
        </ul>
      </div>
    </div>
  </div>
</div>


  <div class="padding_20 text-center">
    <input type="hidden" name="Delete" value="true"/>
    <button class="btn btn-danger shiny" type="submit" id="confirm"><i class="fa  fa-trash-o"></i>删除</button>
  </div>
  
</form>

{template Public:Admin:footer}